﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BHA
{
    public class ItemZone
    {
        public string WellName { get; set; }
        public string ZoneName { get; set; }
        public List<ItemSAP> Items { get; set; }

        public ItemZone(string zonename, string wellname)
        {
            this.WellName = wellname.Trim();
            this.ZoneName = zonename.Trim();
            Items = new List<ItemSAP>();
        }

        public bool Add(ItemSAP item)
        {
            Items.Add(item);
            return true;
        }

        public bool TryAdd(string NoSAP, string UseDescript, string Quantity)
        {

            ItemSAP item = new ItemSAP();
            item.DescriptionUSE = UseDescript;
            item.NoSAP = NoSAP;
            bool b = item.TrySetQuantity(Quantity);
            Items.Add(item);
            return b;
        }
    }
}
